package cn.etg.facatory.simpleFac;

public class SuShiFactory {
    private SuShi suShi;

    public SuShi makeSuShi(String type){
        if("tuna".equalsIgnoreCase(type)){
            suShi = new TunaSuShi(type);
        }else if("vegetable".equalsIgnoreCase(type)){
            suShi = new VegetableSuShi(type);
        }

        return suShi;
    }

    public void prepare(SuShi suShi){
        System.out.println("准备米饭，食材"+suShi.type);
    }
    public void make(){
        System.out.println("制作中....");
    }


    public void finish(SuShi suShi){
        System.out.println(suShi.name+"完成制作");
    }
}
